Null check in onResume

Change-Id: I90869daed48b626de93940c438854a5388ec1926