diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index d1cc7ff..f17f3d6 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -1,6 +1,11 @@
 Changelog
 =========
 
+0.5.1 (2018-11-05)
+------------------
+
+* Fix 'NoneType' object has no attribute 'lower' for meta tags (`#16 <https://github.com/scottwernervt/favicon/issues/16>`_).
+
 0.5.0 (2018-11-05)
 ------------------
 
diff --git a/src/favicon/favicon.py b/src/favicon/favicon.py
index cd18532..df5eaf7 100644
--- a/src/favicon/favicon.py
+++ b/src/favicon/favicon.py
@@ -120,9 +120,10 @@ def tags(url, html):
 
     meta_tags = set()
     for meta_tag in soup.find_all('meta', attrs={'content': True}):
-        meta_type = meta_tag.get('name') or meta_tag.get('property')
+        meta_type = meta_tag.get('name') or meta_tag.get('property') or ''
+        meta_type = meta_type.lower()
         for name in META_NAMES:
-            if meta_type.lower() == name.lower():
+            if meta_type == name.lower():
                 meta_tags.add(meta_tag)
 
     icons = set()

diff --git a/tests/test_favicon.py b/tests/test_favicon.py
index 6551313..ffa32c0 100644
--- a/tests/test_favicon.py
+++ b/tests/test_favicon.py
@@ -116,6 +116,15 @@ def test_meta_content_attribute(m, meta_tag):
     assert icons
 
 
+def test_invalid_meta_tag(m):
+    m.head('http://mock.com/favicon.ico', text='Not Found', status_code=404)
+    m.get('http://mock.com/',
+          text='<meta content="en-US" data-rh="true" itemprop="inLanguage"/>')
+
+    icons = favicon.get('http://mock.com/')
+    assert not icons
+
+
 @pytest.mark.parametrize('url,expected', [
     ('http://mock.com/favicon.ico', True),
     ('favicon.ico', False),

AttributeError: 'NoneType' object has no attribute 'lower'
The following tag `<meta content="en-US" data-rh="true" itemprop="inLanguage"/>` causes an exception because it does not have `name` or `proprety` attribute.

```python
Traceback (most recent call last):
  File "/opt/pycharm-professional/helpers/pydev/pydevd.py", line 1664, in <module>
    main()
  File "/opt/pycharm-professional/helpers/pydev/pydevd.py", line 1658, in main
    globals = debugger.run(setup['file'], None, None, is_module)
  File "/opt/pycharm-professional/helpers/pydev/pydevd.py", line 1068, in run
    pydev_imports.execfile(file, globals, locals)  # execute the script
  File "/opt/pycharm-professional/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "/home/swerner/development/projects/favicon/debug.py", line 3, in <module>
    fav_icons = favicon.get('https://www.nytimes.com/')
  File "/home/swerner/development/projects/favicon/src/favicon/favicon.py", line 69, in get
    link_icons = tags(response.url, response.text)
  File "/home/swerner/development/projects/favicon/src/favicon/favicon.py", line 125, in tags
    if meta_type.lower() == name.lower():
AttributeError: 'NoneType' object has no attribute 'lower'
```
tests/test_favicon.py::test_default tests/test_favicon.py::test_is_absolute[/favicon.ico-False] tests/test_favicon.py::test_meta_content_attribute[og:image] tests/test_favicon.py::test_link_sizes_attribute[64x64 tests/test_favicon.py::test_meta_content_attribute[msapplication-tileimage] tests/test_favicon.py::test_link_rel_attribute[apple-touch-icon] tests/test_favicon.py::test_link_sizes_attribute[any] tests/test_favicon.py::test_meta_content_attribute[msapplication-TileImage] tests/test_favicon.py::test_link_rel_attribute[ICON tests/test_favicon.py::test_link_href_attribute[https] tests/test_favicon.py::test_link_rel_attribute[icon] tests/test_favicon.py::test_is_absolute[favicon.ico-False] tests/test_favicon.py::test_link_sizes_attribute[16x16] tests/test_favicon.py::test_link_rel_attribute[apple-touch-icon-precomposed] tests/test_favicon.py::test_link_rel_attribute[shortcut tests/test_favicon.py::test_link_sizes_attribute[24x24+] tests/test_favicon.py::test_link_href_attribute[relative] tests/test_favicon.py::test_link_href_attribute[query tests/test_favicon.py::test_link_href_attribute[forward tests/test_favicon.py::test_link_sizes_attribute[32x32 tests/test_favicon.py::test_invalid_meta_tag tests/test_favicon.py::test_link_href_attribute[filename tests/test_favicon.py::test_link_sizes_attribute[new tests/test_favicon.py::test_link_href_attribute[filename] tests/test_favicon.py::test_link_sizes_attribute[logo-128x128.png] tests/test_favicon.py::test_is_absolute[http://mock.com/favicon.ico-True]