Returns true id is not null and is not empty.
null
bool get hasValidId => id != null && id!.trim().isEmpty;