Centralize length checking into one method

This standardizes the error messages, and should remove some of the duplication, making code climate happier.  Also, it handles nils and such.

Needs auth converting over too.