class_docstr: A property accepting ``None`` or a value of some other type. 
class_docstr_tok: ["A","property","accepting","``","None","``","or","a","value","of","some","other","type","."]
code: def validate(self, value: Any, detail: bool = True) -> None:
      if value is None:
          return
  
      try:
          super().validate(value, detail=False)
      except ValueError:
          pass
      else:
          return
  
      msg = (
          ""
          if not detail
          else f"expected either None or a value of type {self.type_param}, got {value!r}"
      )
      raise ValueError(msg)
  
file_path: bokeh/src/bokeh/core/property/nullable.py
imports: from __future__ import annotations
  import logging
  from typing import Any, TypeVar, Union
  from ...util.deprecation import deprecated
  from ._sphinx import property_link, register_type_link, type_link
  from .bases import Init, Property, SingleParameterizedProperty, TypeOrInst
  from .required import Required
  from .singletons import Undefined
label_desc: Use image node_id 4 for calling the Nullable obj's underlying member method code with example usage: obj.validate(value, detail) without return types