Check if work is defined before use