AttributeError: 'NoneType' object has no attribute 'lower'

Change-Id: Iff2e6137e7406388182b9deec7f6069a4b6fd452