Protect against NullPointerExceptions when no action is passed