Change the second error handling if statement so return signature consistent