correct error message and remove redundant check

This commit removes a redundant error check, fixes an error message, and updates the relevant tests.
Also, newlines at the end of your files show that you care :wink: