[4.2] Foundation : isProduction()

Add `isProduction()` function to determine if the environment is in production