Verify variable is set before operating on it