Boyd’s Bible Dictionary:

(phantom). Seriously regarded by ancients (Gen. 40). Divine method of approach (Gen. 20:3-7; 1 Sam. 28:6; Acts 27:22-25). Interpretation of an exceptional gift (Gen. 40:5-23; 41:14-45; Dan. 4:19-27).

Concise Bible Dictionary:

Though associated in some passages with trifles and vanities (Job 7:14; Eccl. 5:7), there is yet abundant evidence in the scriptures that God often conveyed His mind to people by means of dreams, and this not only to those who obeyed Him, but also to the heathen (Gen. 20:3, 6; Judg. 7:13). “God speaketh once, yea twice, yet man perceiveth it not. In a dream, in a vision of the night, when deep sleep falleth upon men, in slumberings upon the bed: then He openeth the ears of men, and sealeth their instruction, that He may withdraw man from his purpose, and hide pride from man” (Job 33:14-17). God said that He would instruct His prophets in dreams (Num. 12:6). He also used dreams in the case of Nebuchadnezzar and of Daniel in order to reveal His will and purpose concerning the future.
Joseph, the reputed father of the Lord, was directed several times by means of dreams; and Pilate was warned by his wife to have nothing to do with that just man because of what she had suffered in a dream (Matt. 1:20; Matt. 2:12-22; Matt. 27:19). It is to be remarked that in the last days when God pours out His Spirit on all flesh the sons and daughters will prophesy, and the young men shall see visions, and the old men shall dream dreams (Joel 2:28; Acts 2:17). This will be the way that God will make known His mind in those days.