diff --git a/src/main/java/org/primefaces/component/api/UICalendar.java b/src/main/java/org/primefaces/component/api/UICalendar.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/primefaces/component/api/UICalendar.java
+++ b/src/main/java/org/primefaces/component/api/UICalendar.java
@@ -290,10 +290,16 @@ public abstract class UICalendar extends HtmlInputText implements InputHolder {
 
     /**
      * Only for internal usage within PrimeFaces.
+     * @return Type of the value bound via value expression. May return null when no value is bound.
      */
     public Class<?> getTypeFromValueByValueExpression(FacesContext context) {
         ValueExpression ve = getValueExpression("value");
-        return ve.getType(context.getELContext());
+        if (ve != null) {
+            return ve.getType(context.getELContext());
+        }
+        else {
+            return null;
+        }
     }
 
     /*
#<I>: DatePicker: smart behaviour for showTime and timeOnly-attributes with value-binding to LocalDate/LocalDateTime/LocalTime (#<I>)

null handling