make null check when getting records
Merge pull request #2968 from ahmetmircik/fix/3.3/nullCheck

Fix attempt to #2956: Make null check after getRecord