Fixed a bad refactor

Should have been using the argument that was
being passed in to check if serializable.