fix hasId() on models without id