Why bother abstracting these in to functions if each if(data.whatever) is just going to call the function directly? Might as well inline all three of them.