MyriaUtils: add ensureObjectIsValidType

To check objects that we store in columns or fields