Updated empty check for Beanstalk to check correct state.