Add isDefined method