Expect post_get_or_create to return undef on failure
Pull returns out of branches
Use $pkg instead of spelling it out again