Add missing context check