dont use php empty to check empty strings

PHP's empty should not be used to check if a string is
blank, it has a variety of edge cases like considering
the string '0' to be empty.  Instead lets switch to
trim( $value ) === '' which is likely more accurate anyways.

I think in the future we may want to look into some sort of reusable
validation instead of repeating these conditionals on the various
forms.

Change-Id: Iaed53b2d5d73d1b9027eb0d7aef028861d79869c
Merge "dont use php empty to check empty strings"