[PATCH v3 1/2] mmdevapi: Add nullcheck for parameter that can be null (Coverity)