Bad error message. Check doesn't guarantee `size` is a positive number.

Also the checks aren't consistent between this and `randomBytes`.