I believe this isn't necessary.  If the property wasn't set, an NPE would have been thrown already when the code attempts to call `.toUpperCase()`.  This line and the next may be removed.