Check if userdata is nil in compat before call

Calling a userdata function on nil halts the script, which is bad. We
will return false instead.