In this patch we should really set pkg->handle->errno to something:
either PM_ERR_WRONG_ARGS or create a PM_ERR_PKG_NULL for this purpose,
especially for all functions that return an alpm_list_t where NULL
already means "empty list". I guess it supports the idea of having a
handle in the package.