Handle empty network definitions in recipe

This just makes the code more solid.
Merge pull request #193 from vuntz/avoid-crash

Handle empty network definitions in recipe