ensure values dimensions entering the system are numbers but not NaN or n <= 0

This fixes the elementWidth + ShelfFirst mode bug