Test PLACK_ENV before comparing to string

to avoid undef warning in tests