No error when using SpawnActor in function called by construction script

I just ran into a problem that had my puzzled for a while. I had a function that called SpawnActor. The function was getting called by the Construction Script. The blueprint compiled without any warnings or errors. It took me a while to pin down what was happening (still new to UE4) but I found that SpawnActor was actually returning an invalid object (checked using IsValid). Then I found that I can’t use SpawnActor in the Construction script by trying to add the node there. I worked around this by moving everything to the event begin play.

Could there be some sort of warning or error to make this easier to detect? Could the compiler check to see if the construction script is calling functions with calls that aren’t available?