Fixed getRecordTypeId() so that it can handle an object that has no record types or where the record type name given cannot be found