Be stricter on a gateway

undef will now also be considered empty