made types consistent with the ones of Hack
made usage of return; instead of return null;
minor #1383 Consistency (fabpot)

This PR was merged into the 1.15-dev branch.

Discussion
----------

Consistency

Commits
-------

365feec made usage of return; instead of return null;
81699ca made types consistent with the ones of Hack