Simplify code

Simplified checkMobile() code and cmpValues()