Update ControllerTask.php

Updated if statement for clarity and also fixed spelling mistake.