Add more nullness information for Intellij IDEA

StringUtils.trim and StringUtils.upperCase will mirror the nullness of
their argument.
Add non-null assertion to please code checkers