diff --git a/jsonpatch.py b/jsonpatch.py
index ca22e34..7d5489a 100644
--- a/jsonpatch.py
+++ b/jsonpatch.py
@@ -334,12 +334,18 @@ class PatchOperation(object):
 
     def __init__(self, operation):
 
+        if not operation.__contains__('path'):
+            raise InvalidJsonPatch("Operation must have a 'path' member")
+
         if isinstance(operation['path'], JsonPointer):
             self.location = operation['path'].path
             self.pointer = operation['path']
         else:
             self.location = operation['path']
-            self.pointer = JsonPointer(self.location)
+            try:
+                self.pointer = JsonPointer(self.location)
+            except TypeError as ex:
+                raise InvalidJsonPatch("Invalid 'path'")
 
         self.operation = operation
 
@@ -473,6 +479,9 @@ class ReplaceOperation(PatchOperation):
         if part is None:
             return value
 
+        if part == "-":
+            raise InvalidJsonPatch("'path' with '-' can't be applied to 'replace' operation")
+
         if isinstance(subobj, MutableSequence):
             if part >= len(subobj) or part < 0:
                 raise JsonPatchConflict("can't replace outside of list")

diff --git a/tests.py b/tests.py
index cde90b0..0abf4d2 100755
--- a/tests.py
+++ b/tests.py
@@ -219,6 +219,17 @@ class ApplyPatchTestCase(unittest.TestCase):
             ])
         self.assertEqual(res['foo'], [1, 2, 3, 4])
 
+    def test_add_missing_path(self):
+        obj = {'bar': 'qux'}
+        self.assertRaises(jsonpatch.InvalidJsonPatch,
+                          jsonpatch.apply_patch,
+                          obj, [{'op': 'test', 'value': 'bar'}])
+
+    def test_path_with_null_value(self):
+        obj = {'bar': 'qux'}
+        self.assertRaises(jsonpatch.InvalidJsonPatch,
+                          jsonpatch.apply_patch,
+                          obj, '[{"op": "add", "path": null, "value": "bar"}]')
 
 
 class EqualityTestCase(unittest.TestCase):

Some case Failed when run ext_test
Hi @stefankoegl , when I run the external tests [json-patch-tests](https://github.com/json-patch/json-patch-tests), some case failed, I think some of them are bugs, others are due to unreasonable assertions.
here is the list:
- 1: pass only when changing **add** to **replace** -- **not sure if it is a bug**
```
    { "comment": "replace array document with object document?",
      "doc": [],
      "patch": [{"op": "add", "path": "", "value": {}}],
      "expected": {} }
```
- 2: failed with `KeyError: 'path'` before entering the assertion -- **unreasonable assertion**
```
    { "comment": "missing 'path' parameter",
      "doc": {},
      "patch": [ { "op": "add", "value": "bar" } ],
      "error": "missing 'path' parameter" }
```

- 3: failed with `TypeError: expected string or bytes-like object` before entering the assertion -- **unreasonable assertion**
```
      { "comment": "'path' parameter with null value",
        "doc": {},
        "patch": [ { "op": "add", "path": null, "value": "bar" } ],
        "error": "null is not valid value for 'path'" }
```

-4: index leading with zero should failed but success -- **bug**
```
      { "comment": "test with bad array number that has leading zeros",
        "doc": ["foo", "bar"],
        "patch": [{"op": "test", "path": "/00", "value": "foo"}],
        "error": "test op should reject the array value, it has leading zeros" },
  
      { "comment": "test with bad array number that has leading zeros",
        "doc": ["foo", "bar"],
        "patch": [{"op": "test", "path": "/01", "value": "bar"}],
        "error": "test op should reject the array value, it has leading zeros" }
```
tests.py::ApplyPatchTestCase::test_add_missing_path tests.py::ApplyPatchTestCase::test_path_with_null_value
tests.py::ApplyPatchTestCase::test_add_array_item tests.py::ApplyPatchTestCase::test_add_object_key tests.py::ApplyPatchTestCase::test_add_replace_whole_document tests.py::ApplyPatchTestCase::test_append tests.py::ApplyPatchTestCase::test_apply_patch_from_string tests.py::ApplyPatchTestCase::test_apply_patch_to_copy tests.py::ApplyPatchTestCase::test_apply_patch_to_same_instance tests.py::ApplyPatchTestCase::test_copy_array_item tests.py::ApplyPatchTestCase::test_copy_mutable tests.py::ApplyPatchTestCase::test_copy_object_key tests.py::ApplyPatchTestCase::test_copy_object_keyerror tests.py::ApplyPatchTestCase::test_js_file tests.py::ApplyPatchTestCase::test_move_array_item tests.py::ApplyPatchTestCase::test_move_array_item_into_other_item tests.py::ApplyPatchTestCase::test_move_object_key tests.py::ApplyPatchTestCase::test_move_object_keyerror tests.py::ApplyPatchTestCase::test_remove_array_item tests.py::ApplyPatchTestCase::test_remove_object_key tests.py::ApplyPatchTestCase::test_replace_array_item tests.py::ApplyPatchTestCase::test_replace_object_key tests.py::ApplyPatchTestCase::test_replace_whole_document tests.py::ApplyPatchTestCase::test_success_if_raise_no_error tests.py::ApplyPatchTestCase::test_success_if_replaced_dict tests.py::ApplyPatchTestCase::test_test_error tests.py::ApplyPatchTestCase::test_test_not_existing tests.py::ApplyPatchTestCase::test_test_noval_existing tests.py::ApplyPatchTestCase::test_test_noval_not_existing tests.py::ApplyPatchTestCase::test_test_noval_not_existing_nested tests.py::ApplyPatchTestCase::test_test_success tests.py::ApplyPatchTestCase::test_test_whole_obj tests.py::ApplyPatchTestCase::test_unrecognized_element tests.py::EqualityTestCase::test_patch_equality tests.py::EqualityTestCase::test_patch_hash_equality tests.py::EqualityTestCase::test_patch_hash_unequal tests.py::EqualityTestCase::test_patch_neq_other_objs tests.py::EqualityTestCase::test_patch_unequal tests.py::EqualityTestCase::test_str tests.py::MakePatchTestCase::test_add_nested tests.py::MakePatchTestCase::test_apply_patch_to_copy tests.py::MakePatchTestCase::test_apply_patch_to_same_instance tests.py::MakePatchTestCase::test_array_add_remove tests.py::MakePatchTestCase::test_arrays tests.py::MakePatchTestCase::test_arrays_one_element_sequences tests.py::MakePatchTestCase::test_complex_object tests.py::MakePatchTestCase::test_escape tests.py::MakePatchTestCase::test_issue103 tests.py::MakePatchTestCase::test_issue40 tests.py::MakePatchTestCase::test_issue76 tests.py::MakePatchTestCase::test_issue90 tests.py::MakePatchTestCase::test_json_patch tests.py::MakePatchTestCase::test_list_in_dict tests.py::MakePatchTestCase::test_make_patch_unicode tests.py::MakePatchTestCase::test_move_from_numeric_to_alpha_dict_key tests.py::MakePatchTestCase::test_nested tests.py::MakePatchTestCase::test_objects tests.py::MakePatchTestCase::test_root_list tests.py::OptimizationTests::test_minimal_patch tests.py::OptimizationTests::test_success_if_correct_expected_patch_appied tests.py::OptimizationTests::test_success_if_correct_patch_appied tests.py::OptimizationTests::test_success_if_replace_inside_dict tests.py::OptimizationTests::test_success_if_replace_single_value tests.py::OptimizationTests::test_success_if_replaced_by_object tests.py::OptimizationTests::test_use_move_instead_of_add_remove tests.py::OptimizationTests::test_use_move_instead_of_remove_add tests.py::OptimizationTests::test_use_replace_instead_of_remove_add tests.py::OptimizationTests::test_use_replace_instead_of_remove_add_nested tests.py::ListTests::test_fail_prone_list_1 tests.py::ListTests::test_fail_prone_list_2 tests.py::ListTests::test_fail_prone_list_3 tests.py::ListTests::test_fail_prone_list_4 tests.py::InvalidInputTests::test_invalid_op tests.py::InvalidInputTests::test_missing_op tests.py::ConflictTests::test_insert_oob tests.py::ConflictTests::test_move_into_child tests.py::ConflictTests::test_remove_indexerror tests.py::ConflictTests::test_remove_keyerror tests.py::ConflictTests::test_remove_keyerror_dict tests.py::ConflictTests::test_replace_missing tests.py::ConflictTests::test_replace_oob tests.py::ConflictTests::test_replace_oob_length tests.py::JsonPointerTests::test_create_with_pointer