null activity check was added