drm/crtc_helper: avoid NULL-pointer dereference when encoder is NULL