check if intent is null before launching