Fix #364. ensure a record is always passed to getType()
Merge branch 'pr_388'