enforce string length checks