Wrap screenLockCell detection in a try/catch block. For some reason the security cell may not appear.