text: Title: [MNT]: Add Type Checking to Avoid AttributeError in Functions Handling Units
  Body: ### Summary
  
  Currently, in unit-related example scripts , the code raises an AttributeError when numpy.float64 objects are used without being converted to objects with a convert_to method. This can create issues for users who attempt to pass Numpy float values directly, unaware that the function expects specific unit-handling objects.
  
  ### Proposed fix
  
  Add a type check at the beginning of functions  to ensure that  input is of the correct type. If it is not, raise an exception with a clear message (e.g., "Values must be unit-handling objects, not float").