Ensure inputted code is a string.