Simplify checkMobile()

Simplified checkMobile() code.