In the S7 program, it cannot happen by accidence, as long as you use symbols.
In a Siemens HMI, it also cannot happen by accidence, if the HMI uses the symbols from the STEP7 project.
If using OPC, it also cannot happen by accidence, if using symbols from the STEP7 project.
If not using symbols, it requires a lot more attention and care of what you do.
Anyway, as I wrote before it is not possible to do a test for REAL or DINT.