Coconut Oil for baby

My LO is starting to get a little cradle cap and I was told to put coconut oil on it before his bath. My MIL lost her friggen mind and told me coconut is a nut and he could have an allergic reaction. Is that a valid concern or is she being insane as usual ?