484 nil handling for logics

As requested in #501 this is a pull-request for the partial solve of #484.