Fix illegal function that broke code while checking for type of user's entered number