Cleaned up is_num()