diff --git a/src/View/Helper/HtmlHelper.php b/src/View/Helper/HtmlHelper.php
index bb25efca469..ed17c4c861a 100644
--- a/src/View/Helper/HtmlHelper.php
+++ b/src/View/Helper/HtmlHelper.php
@@ -250,7 +250,7 @@ public function meta($type, $content = null, array $options = [])
} else {
$type = ['name' => $type, 'content' => $content];
}
- } elseif (isset($options['type']) && isset($types[$options['type']])) {
+ } elseif (isset($options['type'], $types[$options['type']])) {
$type = $types[$options['type']];
unset($options['type']);
} else {