test for activity not null