added support for non object types.