Keep allocation and error checking together