edited calcvalue to report an error when there is a type error (for NaN in the amp fields - needs to be fixed by deleting that row