Added some more robust assertion/input checking for orphanet