private Double getDoubleValue(PropertyHelper property) {
    Double val = null;

    // try to read the double value of the entity
    if (property != null && property.getRange() != null) {
      Object v = property.getValue();
      if (v instanceof Double) {
        val = (Double) v;
      } else if (v instanceof Float) {
        val = (double) (Float) v;
      } else if (v instanceof Long) {
        val = (double) (Long) v;
      } else if (v instanceof Integer) {
        val = (double) (Integer) v;
      }
    }
    return val;
  }