Fixing null pointer exception when shutting down stream outside of webcam hours