checkNote now checks the representation invariant that pitch may not be null