Validate the given chunk size and throw error if its invalid. If not provided then return the default value.
Optional
Validate the given chunk size and throw error if its invalid. If not provided then return the default value.