                                      (1+ column)))
                              ? ))
         (shm/init)))
-     ((eq 'Lambda (shm-node-cons parent))
+     ((and parent
+           (eq 'Lambda (shm-node-cons parent)))
       (cond
        ((eq shm-lambda-indent-style 'leftmost-parent)
         (let ((leftmost-parent (cdr (shm-find-furthest-parent-on-line parent-pair))))

        (indent-to (shm-node-start-column operand))
        (insert string " ")))
     ;; Infix operators
     ((eq 'InfixApp (shm-node-cons parent))
      (newline)
      (indent-to (+ (shm-node-start-column parent))))
     ;; Default indentation just copies the current node's indentation

          (newline)
          (indent-to column)))))
     ;; Indent for sum types
     ((and parent
           (eq 'DataDecl (shm-node-cons parent)))
      (newline)
      (indent-to (shm-node-start-column current))
      (delete-char -2)
