Actually, in this case you're okay.  If the length() is 0, it won't add anything to the total length.