Check for staging room var before using

Taking suggestions from @caselas and @EricSlick on setting this check before using the toLowerCase method on an undefined var

Does this work? We still have debate on whether this code is needed at all.