Added checking for most values that can't be negative. It will now throw an error if they are negative.