diff --git a/chart.module b/chart.module
index 76e177b..0984c6d 100644
--- a/chart.module
+++ b/chart.module
@@ -388,7 +388,7 @@ function _chart_encode_data($data) {
         $output .= _chart_encode_data($v);
       }
       else {
-        if ($v !== FALSE) {
+        if (is_numeric($v)) {
           $output .= $v . ',';
         }
         else {
@@ -433,7 +433,7 @@ function _chart_adjust_resolution($chart_id, &$data, $max_value = NULL) {
         _chart_adjust_resolution($chart_id, $data[$k]);
       }
       else {
-        if ($v != 'NULL' && $v > 0) {
+        if (is_numeric($v)) {
           // Adjust values
           if ($v >= $max) {
             $data[$k] = $resoluton;
