DDF-950: added type-checking safeguards