documentIsEmpty now takes into consideration relationship specific fields as well. This enables relationship documents to be removed once all properties are removed