/**
  * Used to remove this class' PropertyChangeHandler from the given bean if it is not {@code null}.
  *
  * @param bean the bean to remove the property change listener from
  * @param listener the property change listener to be removed
  * @throws PropertyUnboundException if the bean does not support bound properties
  * @throws PropertyNotBindableException if the property change handler cannot be removed
  *     successfully
  */
 private static void removePropertyChangeHandler(
     Object bean, Class<?> beanClass, PropertyChangeListener listener) {
   if (bean != null) {
     BeanUtils.removePropertyChangeListener(bean, beanClass, listener);
   }
 }