Fix null pointer bug on missing type map