[CCID3]: Move NULL-protection into function