No need to evaluate this with a > 0. Just have $userModel->checkUsernameExists() return true or false. If it's true raise the error, if it's false move on.