User defined types should not raise an error

Fixes #15697 on 4-1-stable.