Check values are set before casting as floats