Add null check for isDraft