fix `single()` and `first()` handling of empty result sets