public function abs($x = 'NAN') { if (!is_numeric($x) && $x !== null) { return NAN; } return abs($x); }