I believe you wanted to say `getFirstResults(node, [n.eprints+"ispublished"], true) &&`, since we are already dealing with `getFirstResults(node, [n.eprints+"type"], true)`. In that case you can just compare it to "unpub" directly.

Also, the braces here look a bit messy.