interface: fix possible null pointer dereference