Do undefined check only once.