Additional validation to avoid JS error.