Fix issue with elementFromPoint when null

Fixes #434