Added better error reporting for null pointers during Artifact construction.