Adds check for null modulename in metadata. Issue #490