TransportRpmsg: Add NULL check to avoid NULL pointer access