Fix if statement typo in error handling