Made the final if check strict