Detect local is defined