added functions to runtime for creating, accessing and nil checking records