Account for empty (but still present) layers

Check for None explicitly, instead of allowing {} to trigger a 404.