Removing if statement based on non-existent method