Added null sequence check