Now returning UnDef type as default instead of null
Cleaned up unnecessary error messages