raise error if using number_handler for an invalid attribute