diff --git a/src/Form/AddForm.php b/src/Form/AddForm.php
index 4bd6723..62d08e1 100644
--- a/src/Form/AddForm.php
+++ b/src/Form/AddForm.php
@@ -98,7 +98,7 @@ class AddForm extends FormBase {
   public function calculateAge(array &$form, FormStateInterface $form_state) {
     $output = '';
     // If birthdate is not empty.
-    if (!empty($form_state->getValue('birthdate'))) {
+    if (!empty($form_state->getValue('birthdate')) && !empty($form_state->getValue(age_on_date))) {
       $birthdate_array = \explode('-', $form_state->getValue('birthdate'));
       $age_on_date_array = \explode('-', $form_state->getValue('age_on_date'));
       // Formatting user input.
@@ -112,7 +112,7 @@ class AddForm extends FormBase {
         // Object declaration.
         $birthdate_datetime = new \DateTime($birthdate);
         $age_on_date_datetime = new \DateTime($age_on_date);
-      
+
         // Including helper functions inc file.
         module_load_include('inc', 'age_calculator', 'age_calculator.helper_functions');
         // Getting output.
@@ -124,7 +124,7 @@ class AddForm extends FormBase {
      // debug($form_state->getValue('birthdate'), $label = 'date', $print_r = TRUE);
     }
     else {
-      $output = $this->t('ERROR: Date of Birth Field can not be empty.');
+      $output = $this->t('ERROR: Please select the date. Date Field can not be empty.');
     }
     $response = new AjaxResponse();
     $response->addCommand(new HtmlCommand('#age_calculator_calculated_age', $output));
