Removes useless if check.