check whether the number is valid for various conditions