diff --git a/challenges/basic-html5-and-css.json b/challenges/basic-html5-and-css.json
index 24b1c71939..7fdae6da09 100644
--- a/challenges/basic-html5-and-css.json
+++ b/challenges/basic-html5-and-css.json
@@ -1541,7 +1541,7 @@
],
"tests": [
"assert($('input[placeholder]').length > 0, 'Add a placeholder attribute text input element.')",
- "assert($('input').attr('placeholder').match(/cat\\s+photo\\s+URL/gi), 'Set the value of your placeholder attribute to \"cat photo URL\".')"
+ "assert($('input') && $('input').attr('placeholder') && $('input').attr('placeholder').match(/cat\\s+photo\\s+URL/gi), 'Set the value of your placeholder attribute to \"cat photo URL\".')"
],
"challengeSeed": [
"",