Making helpers/object_get() capable of handling Eloquent collections for 4.2

This is a copy of PR  #4874 for 4.2 branch. 

This was discussed in #4853 and should fix #2548, #2809, #4337, #641 and hopefully #1160.