New method to check if value is numeric