adding logic to prevent undefined in the user constraints code