Don't try to access runtime after determining it is null

A tiny fix - if the runtime is null in the extension check return straight away.