title: Neo4j get labels on an optional match
body: <p>I have the following example cypher:</p>
  
  <pre><code>MATCH (n)
  OPTIONAL MATCH (n)-[:likes]-&gt;(p)
  RETURN n, p, label(p)
  </code></pre>
  
  <p>This works great if optional match return a non null value. However if optional match is empty, this fails. Is there a way to return <code>label(p)</code> if p exists else return <code>null</code>?</p>