Sequential options

* Make the processing of sequential options less error prone 
* Check nullity of entities during publicId resolutions