Enhancing Model with isEmpty function