[PATCH v5 3/3] mmdevapi: Add nullcheck for parameter that can be null (Coverity)