micro improve solution for validating number.