Fix potential crashes in case of a bad parameter.
Fix potential crashes in case of a bad parameter.

In both function, if type parameter is NULL, the call to
resource_type_match will crash as this function call strcmp on type
without any check.

https://bugzilla.gnome.org/show_bug.cgi?id=704094

GNOME/gupnp,GNOME/gupnp,GNOME/gupnp,GNOME/gupnp