BISERVER-8183 Fixing isEmpty logic