diff --git a/pynspect/jpath.py b/pynspect/jpath.py
index 84f237a3083a4056cb7e973dd53931e26b067c29..86bf9b7643eb877cb547c0c16e367556d148070d 100644
--- a/pynspect/jpath.py
+++ b/pynspect/jpath.py
@@ -279,11 +279,11 @@ def jpath_values(structure, jpath):
                 idx = chnk['i']
                 # Skip the node, if the key does not exist, the value is not
                 # a list-like object or the list is empty.
-                if not key in node or not (isinstance(node[key], (list, MutableSequence))) or not node[key]:
+                if key not in node or not node[key] or not isinstance(node[key], (list, MutableSequence)):
                     continue
                 try:
                     # Handle '*' special index - append all nodes.
-                    if str(idx) == '*':
+                    if idx == '*':
                         nodes_b.extend(node[key])
                     # Append only node at particular index.
                     else: