added support for nil