Type guards for BaseNode. Since this is the base class, data and scratch are always assumed to be compatible.