Minor writing improvements
Reuse logic for validating strings