can we make this .length() == 0 (instead of isEmpty()) for consistency (see categoryStr below)