types: check null in wlr_surface_is_layer_surface
Managed to cause a SEGFAULT in a server (dwl) by trying to create a popup without a parent. Figured it made sense to do a NULL check here.
Hedging my bets with another PR downstream: https://github.com/djpohly/dwl/pull/329