Check empty collection in addition to null.