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