Started Debugging Search

Fixed spelling on validate variable.
Set - while(query.charAt(0) - strictly equal to (===)
Added closing braces ( } ) to the db.length for loop block