Add |nil| to the end of generated method bodies

This makes the generated method to return a correct value if there is no
|return| statement inside it.

Obviously, just mechanically appending |nil| is stupid. But it will do
for now and we can improve it later with a bit of static analysis.